home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / dns / tsigkeyring.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  728b  |  26 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import base64
  5. import dns.name as dns
  6.  
  7. def from_text(textring):
  8.     keyring = { }
  9.     for keytext in textring:
  10.         keyname = dns.name.from_text(keytext)
  11.         secret = base64.decodestring(textring[keytext])
  12.         keyring[keyname] = secret
  13.     
  14.     return keyring
  15.  
  16.  
  17. def to_text(keyring):
  18.     textring = { }
  19.     for keyname in keyring:
  20.         keytext = dns.name.to_text(keyname)
  21.         secret = base64.encodestring(keyring[keyname])
  22.         textring[keytext] = secret
  23.     
  24.     return textring
  25.  
  26.